from pydantic import BaseModel
from typing import Optional

class Token(BaseModel):
    """JWT Token 响应模型"""
    access_token: str
    token_type: str = "bearer"
    refresh_token: Optional[str] = None

class TokenData(BaseModel):
    """JWT Token 解析后的数据"""
    sub: str  # user_id
    email: Optional[str] = None
    username: Optional[str] = None
    role: Optional[str] = None

